load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "notifier",
    srcs = [
        "events.go",
        "publish.go",
        "store.go",
    ],
    importpath = "github.com/pingcap/tidb/pkg/ddl/notifier",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/ddl/session",
        "//pkg/meta/model",
        "//pkg/util/intest",
        "@com_github_pingcap_errors//:errors",
    ],
)

go_test(
    name = "notifier_test",
    timeout = "short",
    srcs = [
        "events_test.go",
        "publish_testkit_test.go",
    ],
    embed = [":notifier"],
    flaky = True,
    deps = [
        "//pkg/ddl/session",
        "//pkg/meta/model",
        "//pkg/parser/model",
        "//pkg/testkit",
        "@com_github_stretchr_testify//require",
    ],
)
